* {
    box-sizing: border-box;
    outline: none;
}

html {
    font-size: 13px;
}

body {
    padding: 0;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.2em;
    background-color: #f1f1f1;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: #999;
}

// 定义颜色

$colors:("primary": #db9e3f,
    "red": red,
    "blue": blue,
    "white": #fff,
    "light": #f9f9f9,
    "black": #000,
    "dark": #222,
    "grey": #999,
    "grey-1": #666);

@each $colorKey,
$color in $colors {
    .text-#{$colorKey} {
        color: $color;
    }

    .bg-#{$colorKey} {
        background-color: $color;
    }
}

// 定义文本对齐方式

@each $var in (left, center, right) {
    .text-#{$var} {
        text-align: $var;
    }
}

// 字体大小
$base-font-size: 1rem;
$font-sizes:(xxs: 0.6154rem, //8px
    xs: 0.7692rem, //10px
    sm: 0.9231rem, //12px
    md: 1rem, //13px
    lg: 1.0769rem, //14px
    xl: 1.2308rem //16px
);

@each $sizeKey,
$size in $font-sizes {
    .fs-#{$sizeKey} {
        font-size: $size;
    }
}



// 定义 flex 布局

.d-flex {
    display: flex;
}

.flex-colum {
    flex-direction: column;
}

$flex-jc:(start: flex-start,
    end : flex-end,
    center: center,
    between: space-between,
    around: space-around,
);

@each $Key,
$value in $flex-jc {
    .jc-#{$Key} {
        justify-content: $value;
    }
}

$flex-ai:(start: flex-start,
    end : flex-end,
    center: center,
    stretch: stretch);

@each $Key,
$value in $flex-ai {
    .ai-#{$Key} {
        align-items: $value;
    }
}

.flex-1 {
    flex: 1
}


// 定义边距

$spacing-types:(m:margin, p:padding);
$spacing-direction:(t:top, r:right, b:bottom, l:left);
$spacing-base:1rem;
$spacing-sizes:(0:0, 1:0.25, 2:0.5, 3:1, 4:1.5, 5:3);

@each $typeKey,
$type in $spacing-types {

    // m-0形式
    @each $sizeKey,
    $size in $spacing-sizes {
        .#{$typeKey}-#{$sizeKey} {
            #{$type}: $size * $spacing-base
        }
    }

    // mx-1 形式 是对于左右 或上下相等 但是其余两个方位不变 x代表左右 y代表上下
    @each $sizeKey,
    $size in $spacing-sizes {
        .#{$typeKey}x-#{$sizeKey} {
            #{$type}-left: $size * $spacing-base;
            #{$type}-right: $size * $spacing-base
        }

        .#{$typeKey}y-#{$sizeKey} {
            #{$type}-top: $size * $spacing-base;
            #{$type}-bottom: $size * $spacing-base
        }
    }


    @each $directionKey,
    $direction in $spacing-direction {

        @each $sizeKey,
        $size in $spacing-sizes {

            // mt-0 形式
            .#{$typeKey}#{$directionKey}-#{$sizeKey} {
                #{$type}-#{$direction}: $size * $spacing-base
            }
        }
    }
}


// 定义按钮
.btn {
    border: none;
    border-radius: 0.1538rem;
    font-size: map-get($font-sizes, "sm");
    padding: 0.2rem 0.6rem;
}


.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.flex-wrap {
    flex-wrap: wrap;
}

.sprite {
    background: url(./assets//images/index.png) no-repeat 0 0;
    background-size: 28.8462rem;
    display: inline-block;

    &.sprite-news {
        background-position: 63.546% 15.517%;
        width: 1.7692rem;
        height: 1.5385rem;
    }

    &.sprite-shouqi {
        background-position: 38.577% 52.076%;
        width: 0.7692rem;
        height: 0.7692rem;
    }
}


.fr {
    float: right;
}

.bt {
    border-top: 1px solid #666;
}
.bb{
    border-bottom: 1px solid #ccc;
}

.text-elipse {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.fw-2{
    font-weight: 200;
}